#!  python
# -*- coding: UTF-8 -*-
'''
@Author ：Star
@Date ：2022/10/14  
'''

from selenium import webdriver

from selenium.webdriver.common.action_chains import ActionChains

from selenium.webdriver.common.by import By
from time import sleep

from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
import random
from selenium.webdriver.support import expected_conditions as EC

op = webdriver.ChromeOptions()
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_experimental_option("useAutomationExtension", False)
driver = webdriver.Chrome(options=op)
driver.get(r"https://jqueryui.com/resources/demos/slider/multiple-vertical.html")


crossElement=driver.find_element(By.CSS_SELECTOR,".ui-slider-handle.ui-corner-all.ui-state-default")

# dragElement=driver.find_element_by_xpath("//div[contains(@class,'el-table__body-wrapper is-scrolling')]")
action_chains = ActionChains(driver)
ActionChains(driver).drag_and_drop_by_offset(crossElement,40,0).perform()
sleep(3)

lengthways = driver.find_element(By.CSS_SELECTOR,"#eq>span:nth-child(4)")
ActionChains(driver).drag_and_drop_by_offset(lengthways,30,0).perform()
sleep(2)
driver.quit()
